<?php

/**
 * Entity form.
 *
 * @package    form
 * @subpackage Entity
 * @version    SVN: $Id: sfPropelFormTemplate.php 6174 2007-11-27 06:22:40Z fabien $
 */
class PluginEntityForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'entity_uid' => new sfWidgetFormInputHidden(),
      'class_cd'   => new sfWidgetFormInput(),
    ));

    $this->setValidators(array(
      'entity_uid' => new sfValidatorString(array('max_length' => 36)),
      'class_cd'   => new sfValidatorString(array('max_length' => 7)),
    ));

    $this->widgetSchema->setNameFormat('entity[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Entity';
  }
}